<template>
  <div class="hC">
    <div class="title">热门城市</div>
    <div class="host-cities">
      <my-tag v-for="item in hotCities" :key="item.cityId" @click="getCityId(item)">{{ item.name }}</my-tag>
    </div>
  </div>
</template>

<script>
export default {
  name: 'HotCities',
  props: {
    hotCities: {
      type: Array,
      default() {
        return []
      }
    }
  },
  methods: {
    getCityId(item) {
      this.$emit('getCityId', item)
    }
  }
}
</script>

<style lang="scss" scoped>
.hC {
  width: 100%;
  padding: 0.15rem;
  padding-bottom: 0;
  background: #fff;
  .title {
    padding-bottom: 0.15rem;
    color: #797d82;
  }
  .host-cities {
    display: flex;
    flex-wrap: wrap;
    .my-tag {
      margin: 0 0.15rem 0.15rem 0 !important;
    }
  }
}
</style>